package com.zx.controller;

import com.zx.client.ComputeClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by syq on 2017/6/21.
 */
@RestController
public class ConsumerController {

    @Autowired
    private ComputeClient computeClient;

    @RequestMapping(value = "/add", method = RequestMethod.GET)
    public Integer add(@RequestParam(value = "p1") Integer p1, @RequestParam(value = "p2") Integer p2) {
        return computeClient.add(p1, p2);
    }

    @RequestMapping(value = "/getUuid", method = RequestMethod.GET)
    public String getUuid() {
        return computeClient.getUuid("syq-test");
    }
}